import concrete_aggregate.StudentAggregateImpl;
import iterator.StudentIterator;
import model.Student;

public class Client {

    public static void main(String[] args) {

        StudentAggregateImpl studentAggregate = new StudentAggregateImpl();
        studentAggregate.addStudent(new Student("张三","001"));
        studentAggregate.addStudent(new Student("张四","002"));
        studentAggregate.addStudent(new Student("张五","003"));
        studentAggregate.addStudent(new Student("张六","004"));

        StudentIterator iterator = studentAggregate.getStudentIterator();
        while (iterator.hasNext()){
            System.out.println( iterator.next().toString());
        }
    }
}
